package com.un.ebs.customer.domain;

import java.util.Date;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springframework.stereotype.Component;
import lombok.Data;
import com.un.ebs.core.metadata.DbField;

/**
 * (Customer)表实体类
 *
 * @author liubo
 * @since 2020-08-03 20:05:27
 */
@Data
@Component
@TableName("tb_customer")
@SuppressWarnings("serial")
public class Customer extends Model<Customer> {

    @TableId(value = "id", type = IdType.UUID)
    private String id;


    @DbField(name = "name", comment = "客户名称", length = 100, precision = 0)
    private String name;

    @DbField(name = "id_number", length = 20, precision = 0)
    private String idNumber;

    @DbField(name = "birthday", length = -1, precision = 0)
    private Date birthday;

    @DbField(name = "sex", length = -1, precision = 0)
    private Integer sex;

    @DbField(name = "phone", length = 100, precision = 0)
    private String phone;

    @DbField(name = "address", length = 200, precision = 0)
    private String address;

    @DbField(name = "other_name", length = 100, precision = 0)
    private String otherName;

    @DbField(name = "other_phone", length = 20, precision = 0)
    private String otherPhone;

    @DbField(name = "wechat_id", length = 100, precision = 0)
    private String wechatId;

    @DbField(name = "email", length = 100, precision = 0)
    private String email;

    @DbField(name = "personnel_id", length = 40, precision = 0)
    private String personnelId;

    @DbField(name = "source_dict", length = 100, precision = 0)
    private String sourceDict;

    @DbField(name = "level_dict", length = 100, precision = 0)
    private String levelDict;

    @DbField(name = "user_id", length = 40, precision = 0)
    private String userId;

    @TableLogic
    @DbField(name = "is_delete", length = -1, precision = 0)
    private Boolean isDelete;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_time", length = -1, precision = 0)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_at", length = 40, precision = 0)
    private String createAt;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_at_name", length = 100, precision = 0)
    private String createAtName;

    @TableField(fill = FieldFill.UPDATE)
    @DbField(name = "last_modified_time", length = -1, precision = 0)
    private Date lastModifiedTime;

    @TableField(fill = FieldFill.UPDATE)
    @DbField(name = "last_modified_at", length = 40, precision = 0)
    private String lastModifiedAt;

    @DbField(name = "tenant_id", length = 40, precision = 0)
    private String tenantId;

    @DbField(name = "cust_code", length = 100, precision = 0)
    private String custCode;

    @DbField(name = "province_id", length = -1, precision = 0)
    private Integer provinceId;

    @DbField(name = "city_id", length = -1, precision = 0)
    private Integer cityId;

    @DbField(name = "county_id", length = -1, precision = 0)
    private Integer countyId;

    @DbField(name = "suggest_customer_id", length = 40, precision = 0)
    private String suggestCustomerId;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}